package alidns

import (
	"net/http"

	"gitee.com/bitwormhole/cloud-aliyun-api/aliyun/openapi"
)

// DescribeDomainInfo 获取域名信息
type DescribeDomainInfo struct {
	Endpoint string

	Lang                 string
	DomainName           string
	NeedDetailAttributes bool
}

// PrepareRequest ...
func (inst *DescribeDomainInfo) PrepareRequest() *openapi.Request {

	req := &openapi.Request{
		Task: inst,
	}

	action := "DescribeDomainInfo"
	version := myAPIDefaultVersion

	req.Endpoint = inst.Endpoint
	req.HTTPMethod = http.MethodGet
	req.PathParameters = nil
	req.QueryParameters = nil
	req.Style = openapi.StyleRPC
	req.Action = action
	req.APIVersion = version

	setter := &paramSetter{request: req}

	setter.setParamString("Action", action)
	setter.setParamString("Lang", inst.Lang)
	setter.setParamString("DomainName", inst.DomainName)
	setter.setParamBool("NeedDetailAttributes", inst.NeedDetailAttributes)

	return req
}

// HandleResponse ...
func (inst *DescribeDomainInfo) HandleResponse(req *openapi.Request) error {

	return nil
}
